"use strict"

/**
 * 海南省政府采购网爬虫
 *  
 */

var Base = require("./base");
var hn_spider = new Base();
hn_spider.name = "海南省政府采购网";
hn_spider.page = 2;
hn_spider.enabled = false;

hn_spider.getPageUrl = function (pg) {
    
    var url = "http://ccgp-hainan.gov.cn/cgw/cgw_list.jsp?currentPage="+ pg +"&begindate=&enddate=&title=&bid_type=101&proj_number=&zone="
    
    
    return url;
};

hn_spider.getItems = function ($) {
    var items;
    $(".ny_news_lb ul li a").each(function (index, ele) {
        var e = $(ele);
        var item = {};
        item.title = e.text();
        item.url = e.attr("href");
        item.source = hn_spider.name;
        items.push(item);
    });
    return items;
};

exports = module.exports = hn_spider;